package top.zuli.package02.homework06;

public class Demo1 {
    int max(int a,int b){
        return a>b ? a:b ;
    }
    double max(double a,double b){
        return a>b ? a:b ;
    }
    double max(double a,double b,double c){
        double max = a>b ? a:b ;
        return max>c ? max:c;
    }

    public static void main(String[] args) {
        Demo1 demo = new Demo1();
        int result = demo.max(7, 8);
        System.out.println("最大值为："+result);
        double result1 = demo.max(2.7, 1.9);
        System.out.println("最大值为："+result1);
        double result2 = demo.max(3.3, 2.4, 4.2);
        System.out.println("最大值为："+result2);
    }
}
